<include file="public@header"/>
<style type="text/css">
    .cardBox {
        width: 250px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
        text-align: center;
        float: left;
        margin-right: 10px;
        padding: 5px;
        padding-top: 15px;
    }

    .headerBox {
        color: #fff;
        padding: 10px;
        font-size: 15px;
        height: 100px;
    }

    .bodyBox {
        padding: 10px;
    }

    .bodyBox p {
        margin-left: 5px;
    }
</style>

</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>工程奖励/罚款</a></li>
        <li><a href="{:url('add',array('type'=>1,'id'=>$id))}">奖励</a></li>
        <li><a href="{:url('add',array('type'=>2,'id'=>$id))}">罚款</a></li>

    </ul>

    <div class="cardBox" style="margin-bottom: 60px">
        <div class="headerBox" style="background-color: #006fc4;">
            <p>
                总金额 : {$all}
            </p>
            <p>
                奖励汇总 :{$lea}
            </p>
            <p>
                罚款汇总: {$sup}
            </p>

        </div>
    </div>
    <form method="post" class="js-ajax-form margin-top-20">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>日期</th>
                <th>执行人</th>
                <th>支付方式</th>
                <th>班组长</th>
                <th>班组</th>
                <th>奖罚事件</th>
                <th>金额</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
                <volist name="res" id="v">
                    <tr>
                        <td>{$v['date']}</td>
                        <td>{$v['sname']}</td>
                        <td>
                        <?php
                            if($v['pay'] == 1){
                            ?>
                            微信
                            <?php }elseif($v['pay'] == 2){?>
                            支付宝
                            <?php }elseif($v['pay'] == 3){?>
                            银行卡
                            <?php }elseif($v['pay'] == 4){?>
                            现金
                            <?php }else{?>
                            未选择
                            <?php }?>
                        </td>
                        <td>{$v['lname']}</td>
                        <td>{$v['ltype']}</td>
                        <td>{$v['desc']}</td>
                        <td>
                            <?php if($v['type'] == 1){?>
                                <span class="label label-success">{$v['price']}</span>
                            <?php }else{?>
                            <span class="label label-danger">{$v['price']}</span>
                            <?php }?>
                        </td>
                        <td>
                            <a class="btn btn-xs btn-primary js-ajax-submit"
                               href="{:url('see',array('id'=>$v['id']))}">查看详情</a>

                            <a class="btn btn-xs btn-danger js-ajax-delete" class=""
                               href="{:url('del',array('id'=>$v['id']))}">{:lang('DELETE')}</a>
                        </td>
                    </tr>
                </volist>
            </tbody>
        </table>

    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>